export default function setDate(time1,type) {
    let month1 = (new Date(time1).getMonth() + 1) < 10 ? '0' + (new Date(time1).getMonth() + 1) : (new Date(time1).getMonth() + 1)
    let date1 = new Date(time1).getDate() < 10 ? '0' + new Date(time1).getDate() : new Date(time1).getDate()

    if(type=="-"){
        return new Date(time1).getFullYear()+'-' + month1 + '-'+ date1
    }else{
        return new Date(time1).getFullYear()+ month1 + date1
    }
   
}